Repository navigation
Run the Postgres store tests in CI on Postgres 16 and 17 - #729
adityamishra-hydradb wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
|
@hydra-mira-review review |
Mira score 5/5 · 🟢 Good to merge
Postgres store tests now run in CI for both SDKs on Postgres 16 and 17. The job builds and caches a pinned extension, while contributor guidance permits schema drafts to read store catalogs and registries. How this PR works · 4 changes, 2 medium risk, 2 low riskPostgres store integration tests previously skipped in CI because no job supplied a database with the extension installed. This PR builds a pinned extension, caches its files, and runs both SDK suites on Postgres 16 and 17. Contributor guidance also permits schema drafts to read store catalogs and registries while forbidding user rows. 1. Build the Postgres extension from pinned source · 🟠 medium risk ·
|
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
|
@hydra-mira-review review |
1 similar comment
|
@hydra-mira-review review |
Summary
Follow-up to #706. A new CI job,
postgres, builds pg_hydradb from a pinned hydradb commit and runs the Postgres store tests of both SDKs on Postgres 16 and 17. Before this, CI skipped those tests.AGENTS.md now lets a schema draft read a store's own catalog and registry, never user rows.
Implementation details
Door:
two-wayCI and contributor guidance only. No code, API, or stored shape changes.
Cleanup:
noneWhat to delete:
Decisions
These were the open questions of #706 and its stack (#707, #708, #709, #712, #710). As maintainers, we decided them:
.github/pg-hydradb/Dockerfilebuilds the extension inpostgres:<major>-bookwormfrom hydradb58390740c6d7(tag v0.5.0,HYDRADB_REFinci.yml) with Rust 1.99.0, the hydradb toolchain. Its output stage holds onlypg_hydradb.so, the control file, and the SQL file.actions/cache, keyed on the Postgres major version,HYDRADB_REF, and the Dockerfile hash. On a cache hit, Docker builds nothing: the job copies the files into a stockpostgres:<major>-bookwormcontainer and starts it. To move to a newer pg_hydradb, changeHYDRADB_REF.[dev,kuzu,postgres], runstests/test_pg_hydradb_store.py, and runstest/pgHydradbStore.test.tsfrom source. The test importssrc/, so the job needs no TypeScript bundle;SELFGRAPH_TEST_PREBUILT=1skips the build in the global setup.ci.ymlunderpull_request, withcontents: readand no secrets. It never usespull_request_target. A fork PR can read the cache that main saved. Anything it saves stays scoped to its own ref, so it cannot change what main or other PRs restore.asyncpg>=0.30) for Python, and node-postgrespgas an optional peer dependency for TypeScript. No code change.check_answerablestays refused on this store withunsupported_read, because it must read every row. No version that checks only seed candidates (YAGNI).docs/backends.mdalready lists it under "What is refused".PgHydraDBStore.draft_schemareads. A draft still never reads user rows. The test section names thepostgresjob andSG_PG_HYDRADB_URI.Validation
CI on this PR. Both runs show the server version, so the extension loaded through the fixture's
CREATE EXTENSION:tests/test_pg_hydradb_store.pytest/pgHydradbStore.test.tsdocker build1m37s (cargo 60s)docker build2m13s (cargo 1m20s)docker buildstep skippeddocker buildstep skippedSG_PG_HYDRADB_URI, so every CI job skipped these tests.docker build --outputfor Postgres 16 producedlib/pg_hydradb.so,extension/pg_hydradb.control, andextension/pg_hydradb--0.1.0.sql.review-precheckpasses. No new tests; the job runs the existing gated tests.Limits
HYDRADB_REF.Linked issue
Refs #706 (closed by the merged stack).
AI Assistance
Checklist
/approved.AGENTS.md).Breaking changes
None.
🤖 Generated with Claude Code